From 4938aa9c6b7da48f9c313fc545191733cb8a7ec1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 7 Mar 2015 18:25:57 -0500 Subject: [PATCH] Modernize the xReply check Using AC_CHECK_TYPE instead of AC_TRY_COMPILE avoids compiler warnings from -Werror. https://bugzilla.gnome.org/show_bug.cgi?id=535929 --- configure.ac | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index ccbd350b53..6720d5296b 100644 --- a/configure.ac +++ b/configure.ac @@ -1031,22 +1031,16 @@ if test "x$enable_x11_backend" = xyes; then AC_CHECK_FUNC(XextFindDisplay, :, AC_MSG_ERROR([*** libX11 and libXext not found. Check 'config.log' for more details.])) - # Check for xReply - - AC_MSG_CHECKING([if is needed for xReply]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[xReply *rep = NULL; - rep = rep;]])], - [AC_MSG_RESULT([no])], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #include ]], - [[xReply *rep = NULL; - rep = rep;]])], - [AC_MSG_RESULT([yes]) - AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1], - [Define if needed for xReply])], - [AC_MSG_RESULT([unknown]) - AC_MSG_ERROR([xReply type unavailable. X11 is too old])])]) + # Check if is needed for xReply. + + AC_CHECK_TYPE([xReply], , + [AC_CHECK_TYPE([xReply], + [AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1, + [Define if needed for xReply])], + [AC_MSG_ERROR([xReply type unavailable. X11 is too old])], + [[#include + #include ]])], + [[#include ]]) # Check for XKB support. -- 2.30.2